﻿var _DialogWidth2 = "350px";
var _DialogHeight2 = "150px";
var dialogStr2 = "dialogWidth="+_DialogWidth2+";dialogHeight="+_DialogHeight2+";center=yes;border=thin;help=no;status=no;resizable=no;toolbar=no;location=no;title=no";
function DialogBtnExit_OnClick()
{
    //window.dialogArguments.FN_ReSubmit();
    window.opener.location.reload();
	this.close();
}

function DialogBtnDEL_OnClick()
{
	if (confirm('是否確定刪除?'))
	{
		return true;
	}
	else
	{
		return false;
	}
}

function DialogBtnPreview_OnClick()
{
	if (confirm('預覽前需先存檔，是否要存檔?'))
	{
		return true;
	}
	else
	{
		return false;
	}
}

function DialogBtnApprove_OnClick()
{
	if (confirm('送審前會將此版本文案資料更新，是否確認更新?'))
	{
		return true;
	}
	else
	{
		return false;
	}
}

function OpenPreview()
{
	var  urlStr = "VNDW0072.ASPX?B2C_CODE="+$("#txtB2C_CODE").val()+"&DOC_VER="+$("#txtDOC_VER").val();
	
	var _RDialogWidth = "770px";
	var _RDialogHeight = "600px";
	var rdialogStr = "dialogWidth="+_RDialogWidth+";dialogHeight="+_RDialogHeight+";center=yes;border=thin;help=no;status=no;resizable=no;";

	var ArrOfArgu = new Object();
	var result = window.showModalDialog(urlStr, ArrOfArgu, rdialogStr ,true);
}

function OpenApprove()
{
	var  urlStr = "VNDW0072.ASPX?ACTION_TYPE=APPROVE&B2C_CODE="+$("#txtB2C_CODE").val()+"&DOC_VER="+$("#txtDOC_VER").val();
	
	var _RDialogWidth = "770px";
	var _RDialogHeight = "600px";
	var rdialogStr = "dialogWidth="+_RDialogWidth+";dialogHeight="+_RDialogHeight+";center=yes;border=thin;help=no;status=no;resizable=no;";

	var ArrOfArgu = new Object();
	var result = window.showModalDialog(urlStr, ArrOfArgu, rdialogStr ,true);
}